'\" t
.\"     Title: ne_status
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 15 April 2025
.\"    Manual: neon API reference
.\"    Source: neon 0.34.2
.\"  Language: English
.\"
.TH "NE_STATUS" "3" "15 April 2025" "neon 0.34.2" "neon API reference"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ne_status \- HTTP status structure
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <ne_utils\&.h>

typedef struct {
    int major_version;
    int minor_version;
    int code;
    int klass;
    char *reason_phrase;
} ne_status;
.fi
.ft
.SH "DESCRIPTION"
.PP
The
\fBne_status\fR
type represents an HTTP response status; used in response messages giving a result of request\&. The
\fImajor_version\fR
and
\fIminor_version\fR
fields give the protocol version supported by the server issuing the response\&. The
\fIcode\fR
field gives the status code of the result (lying between
100
and
599
inclusive), and the
\fIklass\fR
field gives the class, which is equal to the most significant digit of the status\&. The
\fIreason_phrase\fR
field gives a human\-readable string describing the status, which is purely informational (and optional) \- any interpretation of the response status must be done using the
\fIklass\fR
and/or
\fIcode\fR
fields\&.
.PP
There are five classes of response status code defined for HTTP/1\&.1 (see
\m[blue]\fBRFC 9110 ẞ15\fR\m[]\&\s-2\u[1]\d\s+2):
.PP
1xx
.RS 4
Informational response\&.
.RE
.PP
2xx
.RS 4
Success: the operation was successful
.RE
.PP
3xx
.RS 4
Redirection
.RE
.PP
4xx
.RS 4
Client error: the request made was incorrect in some manner\&.
.RE
.PP
5xx
.RS 4
Server error
.RE
.SH "NOTES"
.PP
The
\fIklass\fR
field is named
\(lqklass\(rq
not
\(lqclass\(rq
so that the header can be used from a C++ program, in which
\(lqclass\(rq
is a reserved word\&.
.SH "SEE ALSO"
.PP
ne_get_status\&.
.SH "COPYRIGHT"
.br
Copyright \(co 2001-2024 Joe Orton
.br
.SH "REFERENCES"
.IP " 1." 4
RFC 9110 ẞ15
.RS 4
\%https://www.rfc-editor.org/rfc/rfc9110#name-status-codes
.RE
